<template>
  <!-- 经费账账簿查询 页面-->
  <div style="display: flex; flex-direction: column;">
    <div id="selectOne">
      <cus-allcard style="padding-bottom: 10px" :showTitle="false">
        <div class="topBody">
          <div class="topBodyItem">
            <span class="itemSpan">账簿年度</span>
            <Select
              v-model="selectForm.accountbookId"
              size="large"
              placeholder="请选择账簿年度"
              @on-change="accountbookIdChange()"
              class="itemImport"
            >
              <Option
                v-for="item in selectForm.yearList"
                :value="item.accountbookId"
                :key="item.year"
                >{{ item.year }}</Option
              >
            </Select>
          </div>
          <div class="topBodyItem">
            <span class="itemSpan">查询日期</span>
            <Date-picker
              type="month"
              v-model="dataForm.tabledate"
              :clearable="false"
              :options="timeOptions"
              placeholder="请选择截止日期"
              @on-change="getStartAndEnd($event)"
              class="itemImport"
            ></Date-picker>
          </div>
          <div class="topBodyItem">
            <cus-Button
              type="primary"
              :disabled="!selectForm.accountbookId"
              @onClick="getYueHuoShiAndYueFoodApi"
              v-permission="20"
              >查询</cus-Button
            >
          </div>

          <div class="topBodyItem">
            <cus-Button
              type="primary"
              :disabled="!selectForm.accountbookId"
              @onClick="saveYueHuoShiAndYueFoodApi"
              v-permission="20"
              >添加/修改</cus-Button
            >
          </div>
          <div class="topBodyItem">
            <cus-Button
              type="primary"
              :disabled="!selectForm.accountbookId"
              @onClick="generateTableChange"
              v-permission="20"
              >获取伙食数据</cus-Button
            >
          </div>
          <div class="topBodyItem">
            <cus-Button
              type="primary"
              v-if="selectForm.accountbookId && dataForm.accountbookId"
              @onClick="getExcelExportByIdApi"
              v-permission="20"
              >导出</cus-Button
            >
          </div>
          <div class="topBodyItem">
            <cus-Button type="primary" @onClick="QuanPing" v-permission="20"
              >全屏</cus-Button
            >
          </div>
        </div>
      </cus-allcard>
    </div>

    <!-- 核算开发 弹框 -->
    <echart-modal
      ref="QuanPingOne"
      title="月伙食公布表"
      :fullscreen="true"
      @onOk="QuanPingOK"
    >
      <!-- <div>
        <Checkbox-group v-model="fesfes">
          <Checkbox label="sss">asdasd</Checkbox>
        </Checkbox-group>
      </div> -->
      <div style="display: flex; overflow: auto">
        <div style="width: 440px; flex-shrink: 0">
          <!-- 伙食费 -->
          <table
            border="1"
            style="
              border-collapse: collapse;
              width: 100%;
              text-align: center;
              width: 440px;
            "
          >
            <thead>
              <tr>
                <th colSpan="1" style="width: 80px">区分</th>
                <th colspan="2" style="width: 260px">项目</th>
                <th colspan="1" style="width: 100px">金额</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td rowspan="9">本月收入</td>
                <td colspan="2">收报销伙食费</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.bhuoshifei"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfBysrhjSun()"
                      @blur="HsfBysrhjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">收本单位军官伙食费</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.jiaohuo"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfBysrhjSun()"
                      @blur="HsfBysrhjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">收军粮差价补贴费</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.bbutie"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfBysrhjSun()"
                      @blur="HsfBysrhjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">收外来人员及家属伙食费</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.wailaijh"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfBysrhjSun()"
                      @blur="HsfBysrhjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>

              <tr>
                <td rowspan="2">生产收益补贴</td>
                <td colspan="1">上级补</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.shengchans"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfBysrhjSun()"
                      @blur="HsfBysrhjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="1">自补</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.shengchanz"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfBysrhjSun()"
                      @blur="HsfBysrhjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">其他</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.shouruqita"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfBysrhjSun()"
                      @blur="HsfBysrhjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2" style="height: 30px"></td>
                <td colspan="1"></td>
              </tr>
              <tr>
                <td colspan="2">合计</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.shouruheji"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>

              <tr>
                <td rowspan="6">本月支出</td>
                <td colspan="2">付消耗主食款</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.xhzhushi"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfByzchjSun()"
                      @blur="HsfByzchjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">付消耗副食燃料款</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.xhfushig"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfByzchjSun()"
                      @blur="HsfByzchjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">付外出退伙人员伙食费与军粮差价</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.twaichu"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfByzchjSun()"
                      @blur="HsfByzchjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">其他</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.zhichuqita"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="HsfByzchjSun()"
                      @blur="HsfByzchjSun()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2" style="height: 30px"></td>
                <td colspan="1" align="right"></td>
              </tr>
              <tr>
                <td colspan="2">合计</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.zhichuheji"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="3">本月节超</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.jiechao"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="oneAllMoneyChange()"
                      @blur="oneAllMoneyChange()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td rowspan="3">累计节超</td>
                <td colspan="2">上月累计节超</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.sjieyu"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="oneAllMoneyChange()"
                      @blur="oneAllMoneyChange()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">本月累计节超</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.leijijiechao"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="oneAllMoneyChange()"
                      @blur="oneAllMoneyChange()"
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2" style="height: 30px"></td>
                <td colspan="1"></td>
              </tr>
            </tbody>
          </table>
        </div>
        <div style="width:20px;height10px;flex-shrink:0"></div>
        <div style="width: 780px; flex-shrink: 0">
          <!-- 粮食 -->
          <table
            border="1"
            style="border-collapse: collapse; text-align: center; width: 780px"
          >
            <thead>
              <tr>
                <th colSpan="1" style="width: 80px">区分</th>
                <th colspan="2" style="width: 200px">项目</th>
                <th colspan="1" style="width: 100px">小麦粉</th>
                <th colSpan="1" style="width: 100px">大米</th>
                <th colspan="1" style="width: 100px">食油</th>
                <th colspan="1" style="width: 100px">大豆</th>
                <th colspan="1" style="width: 100px">合计（千克）</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td rowspan="9">本月收入</td>
                <td colspan="2" rowspan="1">报销粮食</td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.bflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrBxlsHjSun()"
                      @blur="LsBysrBxlsHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.brice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrBxlsHjSun()"
                      @blur="LsBysrBxlsHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.boil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrBxlsHjSun()"
                      @blur="LsBysrBxlsHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.bbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrBxlsHjSun()"
                      @blur="LsBysrBxlsHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.bwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">收生产补助粮</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.sbflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrSscbzlHjSun()"
                      @blur="LsBysrSscbzlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.sbrice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrSscbzlHjSun()"
                      @blur="LsBysrSscbzlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.sboil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrSscbzlHjSun()"
                      @blur="LsBysrSscbzlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.sbbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrSscbzlHjSun()"
                      @blur="LsBysrSscbzlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.sbwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">其他</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtsrflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrQtHjSun()"
                      @blur="LsBysrQtHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtsrrice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrQtHjSun()"
                      @blur="LsBysrQtHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtsroil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrQtHjSun()"
                      @blur="LsBysrQtHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtsrbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBysrQtHjSun()"
                      @blur="LsBysrQtHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtsrwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2" style="height: 30px"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
              </tr>
              <tr>
                <td colspan="2" style="height: 30px"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
              </tr>
              <tr>
                <td colspan="2" style="height: 30px"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
              </tr>
              <tr>
                <td colspan="2" style="height: 30px"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
              </tr>
              <tr>
                <td colspan="2" style="height: 30px"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
                <td colspan="1"></td>
              </tr>
              <tr>
                <td colspan="2">合计</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hjflour"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hjrice"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hjoil"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hjbean"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hjwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>

              <tr>
                <td rowspan="4">本月支出</td>
                <td colspan="2">付伙食消耗粮</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hxflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcFhsxhlHjSun()"
                      @blur="LsByzcFhsxhlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hxrice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcFhsxhlHjSun()"
                      @blur="LsByzcFhsxhlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hxoil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcFhsxhlHjSun()"
                      @blur="LsByzcFhsxhlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hxbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcFhsxhlHjSun()"
                      @blur="LsByzcFhsxhlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hxwhole"
                      :disabled="true"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">付自然损耗粮</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.zrflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcFzrxhlHjSun()"
                      @blur="LsByzcFzrxhlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.zrrice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcFzrxhlHjSun()"
                      @blur="LsByzcFzrxhlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.zroil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcFzrxhlHjSun()"
                      @blur="LsByzcFzrxhlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.zrbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcFzrxhlHjSun()"
                      @blur="LsByzcFzrxhlHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.zrwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">其他</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtzcflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcQtHjSun()"
                      @blur="LsByzcQtHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtzcrice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcQtHjSun()"
                      @blur="LsByzcQtHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtzcoil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcQtHjSun()"
                      @blur="LsByzcQtHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtzcbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByzcQtHjSun()"
                      @blur="LsByzcQtHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.qtzcwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">合计</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hejixiaohaoflour"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hejixiaohaorice"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hejixiaohaooil"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hejixiaohaobean"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.hejixiaohaowhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="3">本月节超</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byjiechaoflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBycjHjHjSun()"
                      @blur="LsBycjHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byjiechaorice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBycjHjHjSun()"
                      @blur="LsBycjHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byjiechaooil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBycjHjHjSun()"
                      @blur="LsBycjHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byjiechaobean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsBycjHjHjSun()"
                      @blur="LsBycjHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byjiechaowhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td rowspan="5">累计节超</td>
                <td colspan="2">上月累计节超</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.syljjiechaoflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsSyljjcHjHjSun()"
                      @blur="LsSyljjcHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.syljjiechaorice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsSyljjcHjHjSun()"
                      @blur="LsSyljjcHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.syljjiechaooil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsSyljjcHjHjSun()"
                      @blur="LsSyljjcHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.syljjiechaobean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsSyljjcHjHjSun()"
                      @blur="LsSyljjcHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.syljjiechaowhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="2">本月累计节超</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byljjiechaoflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByljjcHjHjSun()"
                      @blur="LsByljjcHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byljjiechaorice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByljjcHjHjSun()"
                      @blur="LsByljjcHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byljjiechaooil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByljjcHjHjSun()"
                      @blur="LsByljjcHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byljjiechaobean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsByljjcHjHjSun()"
                      @blur="LsByljjcHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.byljjiechaowhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td rowspan="3">其中</td>
                <td rowspan="1" colspan="1">存(欠)上级粮食数</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.cqsjflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsCQsjlssHjHjSun()"
                      @blur="LsCQsjlssHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.cqsjrice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsCQsjlssHjHjSun()"
                      @blur="LsCQsjlssHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.cqsjoil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsCQsjlssHjHjSun()"
                      @blur="LsCQsjlssHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.cqsjbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsCQsjlssHjHjSun()"
                      @blur="LsCQsjlssHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.cqsjwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td rowspan="1" colspan="1">库存粮食数</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kcxlflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsKclssHjHjSun()"
                      @blur="LsKclssHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kcxlrice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsKclssHjHjSun()"
                      @blur="LsKclssHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kcxloil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsKclssHjHjSun()"
                      @blur="LsKclssHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kcxlbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsKclssHjHjSun()"
                      @blur="LsKclssHjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kcxlwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
              <tr>
                <td rowspan="1" colspan="1">库存粮票数</td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kclmflour"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsKclpsjHjSun()"
                      @blur="LsKclpsjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kclmrice"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsKclpsjHjSun()"
                      @blur="LsKclpsjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kclmoil"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsKclpsjHjSun()"
                      @blur="LsKclpsjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kclmbean"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="LsKclpsjHjSun()"
                      @blur="LsKclpsjHjSun()"
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1">
                  <div class="tableInput">
                    <Input-number
                      v-model="dataForm.kclmwhole"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
        <div style="width:20px;height10px;flex-shrink:0"></div>
        <div style="width: 740px; flex-shrink: 0">
          <!-- 生活水平 -->
          <table
            border="1"
            style="border-collapse: collapse; text-align: center; width: 760px"
          >
            <thead>
              <tr>
                <th colSpan="1" style="width: 200px">品名</th>
                <th colspan="1" style="width: 140px">购买总数(千克)</th>
                <th colspan="1" style="width: 140px">自产总数(千克)</th>
                <th colSpan="1" style="width: 140px">合计(千克)</th>
                <th colspan="1" style="width: 140px">平均每人每天(克)</th>
              </tr>
            </thead>
            <tbody>
              <tr v-for="(item, index) in dataForm.yueFoodList" :key="index">
                <td colspan="1">
                  <Input
                    v-model="item.foodname"
                    :disabled="false"
                    class="ssss"
                    maxlength="15"
                  ></Input>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="item.buyquantity"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="
                        ShspGpmHjSun(
                          item.buyquantity,
                          item.zichanquantity,
                          index
                        )
                      "
                      @blur="
                        ShspGpmHjSun(
                          item.buyquantity,
                          item.zichanquantity,
                          index
                        )
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="item.zichanquantity"
                      class="inputNumberWidth"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                      @on-change="
                        ShspGpmHjSun(
                          item.buyquantity,
                          item.zichanquantity,
                          index
                        )
                      "
                      @blur="
                        ShspGpmHjSun(
                          item.buyquantity,
                          item.zichanquantity,
                          index
                        )
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="item.hejiquantity"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
                <td colspan="1" align="right">
                  <div class="tableInput">
                    <Input-number
                      v-model="item.average"
                      class="inputNumberWidth"
                      :disabled="true"
                      :formatter="
                        (value) =>
                          `${parseFloat(Math.floor(value * 100) / 100)}`
                      "
                    ></Input-number>
                  </div>
                </td>
              </tr>

              <tr>
                <td colspan="5" align="left">
                  <div style="display: flex; align-items: center">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.areatype"
                        style="width: 60px"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="oneAllMoneyChange()"
                        @blur="oneAllMoneyChange()"
                      ></Input-number>
                    </div>
                    类区
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.zaobie"
                        style="width: 60px"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="oneAllMoneyChange()"
                        @blur="oneAllMoneyChange()"
                      ></Input-number>
                    </div>
                    类灶每人每天伙食费：
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.huoshistandard"
                        style="width: 120px"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="ShspMrmthsf()"
                        @blur="ShspMrmthsf()"
                      ></Input-number>
                    </div>
                    元,购粮补贴：
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.provisionDifference"
                        style="width: 120px"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="ShspGlbt()"
                        @blur="ShspGlbt()"
                      ></Input-number>
                    </div>
                    元
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="5" align="left">
                  <div style="display: flex; align-items: center">
                    实际就餐天数：
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.realjiucantianshu"
                        style="width: 80px"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="ShspSjjcts()"
                        @blur="ShspSjjcts()"
                      ></Input-number>
                    </div>
                    天
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="5" align="left">
                  <div style="display: flex; align-items: center">
                    每人每天实际开支伙食费：
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.realkaizhihuoshi"
                        style="width: 120px"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                    元
                  </div>
                </td>
              </tr>
              <tr>
                <td colspan="5" align="left">
                  <div style="display: flex; align-items: center">
                    每人每天实际超过标准：
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.reallowerstandard"
                        style="width: 120px"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                    元
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </echart-modal>
    <grid-content></grid-content>
    <div
      v-if="false"
      style="flex:1;height100%;width:100%;overflow:auto"
      class="tableBox"
    >
      <cus-allcard
        style="margin-top: 24px; padding-top: 24px; height: calc(100% - 20px)"
        :showTitle="false"
      >
        <div style="display: flex; justify-content: center">
          <Checkbox-group
            v-model="CheckboxName"
            @on-change="CheckboxNamechange"
          >
            <Checkbox label="伙食费">伙食费</Checkbox>
            <Checkbox label="粮食">粮食</Checkbox>
            <Checkbox label="生活水平">生活水平</Checkbox>
          </Checkbox-group>
        </div>
        <div
          style="
            display: flex;
            overflow: auto;
            height: calc(100% - 20px);
            width: 100%;
            overflow: auto;
          "
        >
          <div
            v-if="CheckboxName.indexOf('伙食费') != -1"
            style="flex-shrink: 0"
          >
            <!-- 伙食费 -->
            <table
              border="1"
              style="
                border-collapse: collapse;
                width: 100%;
                text-align: center;
                width: 440px;
              "
            >
              <thead>
                <tr>
                  <th colSpan="1" style="width: 80px">区分</th>
                  <th colspan="2" style="width: 260px">项目</th>
                  <th colspan="1" style="width: 100px">金额</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td rowspan="9">本月收入</td>
                  <td colspan="2">收报销伙食费</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.bhuoshifei"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfBysrhjSun()"
                        @blur="HsfBysrhjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">收本单位军官伙食费</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.jiaohuo"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfBysrhjSun()"
                        @blur="HsfBysrhjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">收军粮差价补贴费</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.bbutie"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfBysrhjSun()"
                        @blur="HsfBysrhjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">收外来人员及家属伙食费</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.wailaijh"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfBysrhjSun()"
                        @blur="HsfBysrhjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>

                <tr>
                  <td rowspan="2">生产收益补贴</td>
                  <td colspan="1">上级补</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.shengchans"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfBysrhjSun()"
                        @blur="HsfBysrhjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="1">自补</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.shengchanz"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfBysrhjSun()"
                        @blur="HsfBysrhjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">其他</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.shouruqita"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfBysrhjSun()"
                        @blur="HsfBysrhjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2" style="height: 30px"></td>
                  <td colspan="1"></td>
                </tr>
                <tr>
                  <td colspan="2">合计</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.shouruheji"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>

                <tr>
                  <td rowspan="6">本月支出</td>
                  <td colspan="2">付消耗主食款</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.xhzhushi"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfByzchjSun()"
                        @blur="HsfByzchjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">付消耗副食燃料款</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.xhfushig"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfByzchjSun()"
                        @blur="HsfByzchjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">付外出退伙人员伙食费与军粮差价</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.twaichu"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfByzchjSun()"
                        @blur="HsfByzchjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">其他</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.zhichuqita"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="HsfByzchjSun()"
                        @blur="HsfByzchjSun()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2" style="height: 30px"></td>
                  <td colspan="1" align="right"></td>
                </tr>
                <tr>
                  <td colspan="2">合计</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.zhichuheji"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="3">本月节超</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.jiechao"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="oneAllMoneyChange()"
                        @blur="oneAllMoneyChange()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td rowspan="3">累计节超</td>
                  <td colspan="2">上月累计节超</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.sjieyu"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="oneAllMoneyChange()"
                        @blur="oneAllMoneyChange()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">本月累计节超</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.leijijiechao"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="oneAllMoneyChange()"
                        @blur="oneAllMoneyChange()"
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2" style="height: 30px"></td>
                  <td colspan="1"></td>
                </tr>
              </tbody>
            </table>
          </div>
          <div style="width:20px;height10px;flex-shrink:0"></div>
          <div v-if="CheckboxName.indexOf('粮食') != -1" style="flex-shrink: 0">
            <!-- 粮食 -->
            <table
              border="1"
              style="
                border-collapse: collapse;
                text-align: center;
                width: 780px;
              "
            >
              <thead>
                <tr>
                  <th colSpan="1" style="width: 80px">区分</th>
                  <th colspan="2" style="width: 200px">项目</th>
                  <th colspan="1" style="width: 100px">小麦粉</th>
                  <th colSpan="1" style="width: 100px">大米</th>
                  <th colspan="1" style="width: 100px">食油</th>
                  <th colspan="1" style="width: 100px">大豆</th>
                  <th colspan="1" style="width: 100px">合计（千克）</th>
                </tr>
              </thead>
              <tbody>
                <tr>
                  <td rowspan="9">本月收入</td>
                  <td colspan="2" rowspan="1">报销粮食</td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.bflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrBxlsHjSun()"
                        @blur="LsBysrBxlsHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.brice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrBxlsHjSun()"
                        @blur="LsBysrBxlsHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.boil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrBxlsHjSun()"
                        @blur="LsBysrBxlsHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.bbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrBxlsHjSun()"
                        @blur="LsBysrBxlsHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.bwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">收生产补助粮</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.sbflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrSscbzlHjSun()"
                        @blur="LsBysrSscbzlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.sbrice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrSscbzlHjSun()"
                        @blur="LsBysrSscbzlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.sboil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrSscbzlHjSun()"
                        @blur="LsBysrSscbzlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.sbbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrSscbzlHjSun()"
                        @blur="LsBysrSscbzlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.sbwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">其他</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtsrflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrQtHjSun()"
                        @blur="LsBysrQtHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtsrrice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrQtHjSun()"
                        @blur="LsBysrQtHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtsroil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrQtHjSun()"
                        @blur="LsBysrQtHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtsrbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBysrQtHjSun()"
                        @blur="LsBysrQtHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtsrwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2" style="height: 30px"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                </tr>
                <tr>
                  <td colspan="2" style="height: 30px"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                </tr>
                <tr>
                  <td colspan="2" style="height: 30px"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                </tr>
                <tr>
                  <td colspan="2" style="height: 30px"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                </tr>
                <tr>
                  <td colspan="2" style="height: 30px"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                  <td colspan="1"></td>
                </tr>
                <tr>
                  <td colspan="2">合计</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hjflour"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hjrice"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hjoil"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hjbean"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hjwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>

                <tr>
                  <td rowspan="4">本月支出</td>
                  <td colspan="2">付伙食消耗粮</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hxflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcFhsxhlHjSun()"
                        @blur="LsByzcFhsxhlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hxrice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcFhsxhlHjSun()"
                        @blur="LsByzcFhsxhlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hxoil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcFhsxhlHjSun()"
                        @blur="LsByzcFhsxhlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hxbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcFhsxhlHjSun()"
                        @blur="LsByzcFhsxhlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hxwhole"
                        :disabled="true"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">付自然损耗粮</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.zrflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcFzrxhlHjSun()"
                        @blur="LsByzcFzrxhlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.zrrice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcFzrxhlHjSun()"
                        @blur="LsByzcFzrxhlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.zroil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcFzrxhlHjSun()"
                        @blur="LsByzcFzrxhlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.zrbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcFzrxhlHjSun()"
                        @blur="LsByzcFzrxhlHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.zrwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">其他</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtzcflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcQtHjSun()"
                        @blur="LsByzcQtHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtzcrice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcQtHjSun()"
                        @blur="LsByzcQtHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtzcoil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcQtHjSun()"
                        @blur="LsByzcQtHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtzcbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByzcQtHjSun()"
                        @blur="LsByzcQtHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.qtzcwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">合计</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hejixiaohaoflour"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hejixiaohaorice"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hejixiaohaooil"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hejixiaohaobean"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.hejixiaohaowhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="3">本月节超</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byjiechaoflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBycjHjHjSun()"
                        @blur="LsBycjHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byjiechaorice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBycjHjHjSun()"
                        @blur="LsBycjHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byjiechaooil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBycjHjHjSun()"
                        @blur="LsBycjHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byjiechaobean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsBycjHjHjSun()"
                        @blur="LsBycjHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byjiechaowhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td rowspan="5">累计节超</td>
                  <td colspan="2">上月累计节超</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.syljjiechaoflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsSyljjcHjHjSun()"
                        @blur="LsSyljjcHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.syljjiechaorice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsSyljjcHjHjSun()"
                        @blur="LsSyljjcHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.syljjiechaooil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsSyljjcHjHjSun()"
                        @blur="LsSyljjcHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.syljjiechaobean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsSyljjcHjHjSun()"
                        @blur="LsSyljjcHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.syljjiechaowhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="2">本月累计节超</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byljjiechaoflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByljjcHjHjSun()"
                        @blur="LsByljjcHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byljjiechaorice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByljjcHjHjSun()"
                        @blur="LsByljjcHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byljjiechaooil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByljjcHjHjSun()"
                        @blur="LsByljjcHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byljjiechaobean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsByljjcHjHjSun()"
                        @blur="LsByljjcHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.byljjiechaowhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td rowspan="3">其中</td>
                  <td rowspan="1" colspan="1">存(欠)上级粮食数</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.cqsjflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsCQsjlssHjHjSun()"
                        @blur="LsCQsjlssHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.cqsjrice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsCQsjlssHjHjSun()"
                        @blur="LsCQsjlssHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.cqsjoil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsCQsjlssHjHjSun()"
                        @blur="LsCQsjlssHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.cqsjbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsCQsjlssHjHjSun()"
                        @blur="LsCQsjlssHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.cqsjwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td rowspan="1" colspan="1">库存粮食数</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kcxlflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsKclssHjHjSun()"
                        @blur="LsKclssHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kcxlrice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsKclssHjHjSun()"
                        @blur="LsKclssHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kcxloil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsKclssHjHjSun()"
                        @blur="LsKclssHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kcxlbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsKclssHjHjSun()"
                        @blur="LsKclssHjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kcxlwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
                <tr>
                  <td rowspan="1" colspan="1">库存粮票数</td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kclmflour"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsKclpsjHjSun()"
                        @blur="LsKclpsjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kclmrice"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsKclpsjHjSun()"
                        @blur="LsKclpsjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kclmoil"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsKclpsjHjSun()"
                        @blur="LsKclpsjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kclmbean"
                        class="inputNumberWidth"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="LsKclpsjHjSun()"
                        @blur="LsKclpsjHjSun()"
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1">
                    <div class="tableInput">
                      <Input-number
                        v-model="dataForm.kclmwhole"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
          <div style="width:20px;height10px;flex-shrink:0"></div>
          <div
            v-if="CheckboxName.indexOf('生活水平') != -1"
            style="flex-shrink: 0"
          >
            <!-- 生活水平 -->
            <table
              border="1"
              style="
                border-collapse: collapse;
                text-align: center;
                width: 760px;
              "
            >
              <thead>
                <tr>
                  <th colSpan="1" style="width: 200px">品名</th>
                  <th colspan="1" style="width: 140px">购买总数(千克)</th>
                  <th colspan="1" style="width: 140px">自产总数(千克)</th>
                  <th colSpan="1" style="width: 140px">合计(千克)</th>
                  <th colspan="1" style="width: 140px">平均每人每天(克)</th>
                </tr>
              </thead>
              <tbody>
                <tr v-for="(item, index) in dataForm.yueFoodList" :key="index">
                  <td colspan="1">
                    <Input
                      v-model="item.foodname"
                      :disabled="true"
                      class="ssss"
                      maxlength="15"
                    ></Input>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="item.buyquantity"
                        class="inputNumberWidth"
                        :disabled="!item.foodname"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="
                          ShspGpmHjSun(
                            item.buyquantity,
                            item.zichanquantity,
                            index
                          )
                        "
                        @blur="
                          ShspGpmHjSun(
                            item.buyquantity,
                            item.zichanquantity,
                            index
                          )
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="item.zichanquantity"
                        class="inputNumberWidth"
                        :disabled="!item.foodname"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                        @on-change="
                          ShspGpmHjSun(
                            item.buyquantity,
                            item.zichanquantity,
                            index
                          )
                        "
                        @blur="
                          ShspGpmHjSun(
                            item.buyquantity,
                            item.zichanquantity,
                            index
                          )
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="item.hejiquantity"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                  <td colspan="1" align="right">
                    <div class="tableInput">
                      <Input-number
                        v-model="item.average"
                        class="inputNumberWidth"
                        :disabled="true"
                        :formatter="
                          (value) =>
                            `${parseFloat(Math.floor(value * 100) / 100)}`
                        "
                      ></Input-number>
                    </div>
                  </td>
                </tr>

                <tr>
                  <td colspan="5" align="left">
                    <div style="display: flex; align-items: center">
                      <div class="tableInput">
                        <Input-number
                          v-model="dataForm.areatype"
                          style="width: 60px"
                          :formatter="
                            (value) =>
                              `${parseFloat(Math.floor(value * 100) / 100)}`
                          "
                          @on-change="oneAllMoneyChange()"
                          @blur="oneAllMoneyChange()"
                        ></Input-number>
                      </div>
                      类区
                      <div class="tableInput">
                        <Input-number
                          v-model="dataForm.zaobie"
                          style="width: 60px"
                          :formatter="
                            (value) =>
                              `${parseFloat(Math.floor(value * 100) / 100)}`
                          "
                          @on-change="oneAllMoneyChange()"
                          @blur="oneAllMoneyChange()"
                        ></Input-number>
                      </div>
                      类灶每人每天伙食费：
                      <div class="tableInput">
                        <Input-number
                          v-model="dataForm.huoshistandard"
                          style="width: 120px"
                          :formatter="
                            (value) =>
                              `${parseFloat(Math.floor(value * 100) / 100)}`
                          "
                          @on-change="ShspMrmthsf()"
                          @blur="ShspMrmthsf()"
                        ></Input-number>
                      </div>
                      元,购粮补贴：
                      <div class="tableInput">
                        <Input-number
                          v-model="dataForm.provisionDifference"
                          style="width: 120px"
                          :formatter="
                            (value) =>
                              `${parseFloat(Math.floor(value * 100) / 100)}`
                          "
                          @on-change="ShspGlbt()"
                          @blur="ShspGlbt()"
                        ></Input-number>
                      </div>
                      元
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="5" align="left">
                    <div style="display: flex; align-items: center">
                      实际就餐天数：
                      <div class="tableInput">
                        <Input-number
                          v-model="dataForm.realjiucantianshu"
                          style="width: 80px"
                          :formatter="
                            (value) =>
                              `${parseFloat(Math.floor(value * 100) / 100)}`
                          "
                          @on-change="ShspSjjcts()"
                          @blur="ShspSjjcts()"
                        ></Input-number>
                      </div>
                      天
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="5" align="left">
                    <div style="display: flex; align-items: center">
                      每人每天实际开支伙食费：
                      <div class="tableInput">
                        <Input-number
                          v-model="dataForm.realkaizhihuoshi"
                          style="width: 120px"
                          :disabled="true"
                          :formatter="
                            (value) =>
                              `${parseFloat(Math.floor(value * 100) / 100)}`
                          "
                        ></Input-number>
                      </div>
                      元
                    </div>
                  </td>
                </tr>
                <tr>
                  <td colspan="5" align="left">
                    <div style="display: flex; align-items: center">
                      每人每天实际超过标准：
                      <div class="tableInput">
                        <Input-number
                          v-model="dataForm.reallowerstandard"
                          style="width: 120px"
                          :disabled="true"
                          :formatter="
                            (value) =>
                              `${parseFloat(Math.floor(value * 100) / 100)}`
                          "
                        ></Input-number>
                      </div>
                      元
                    </div>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </cus-allcard>
    </div>
    <!-- 使用粘性定位 -->
    <div v-if="superiorState" class="sticky-button">
      <cus-Button class="mr_10" type="default" @onClick="returnHome"
        >返回首页</cus-Button
      >
    </div>
  </div>
</template>
<script>
import {
  getAccountBookByUserId,
  getYueHuoShiAndYueFood,
  saveYueHuoShiAndYueFood,
  createYueHuoShi,
  getExcelExportById,
} from "@/api/businessAccountingApi/essentialInformationApi";
import gridContent from "./components/gridContent.vue";
const yueFoodList = {
  yuefoodId: null, //id
  yuehuoshiid: null, //月伙食公布表id
  foodname: null, //品名
  buyquantity: null, //购买总数(千克)
  zichanquantity: null, //自产总数(千克)
  hejiquantity: null, //合计(千克)
  average: null, //平均每人每天(克)
};
export default {
  components: {
    gridContent,
  },
  data() {
    return {
      CheckboxName: ["伙食费", "粮食"],
      superiorState: false,
      form: {
        loading: false,
        name: "",
        startTime: "",
        endTime: "",
      },
      // 查询条件的集合
      selectForm: {
        year: null, // 账薄年度
        yearList: [], // 账薄年度列表
        accountbookId: null, // 账簿id
        yuehuoshiId: null, // 月伙食公布表id
        selectMonth: null, // 查询日期
      },
      dataForm: {
        accountbookId: null, //账簿ID
        yuehuoshiId: null, //月伙食公布表id(添加时不传)
        tabledate: null, //日期(格式:yyyy-MM-dd)
        operator: null, //提交人
        operatorid: null, //提交人ID
        tablename: null, //表名
        bhuoshifei: null, //收报销伙食费
        jiaohuo: null, //收本单位军官交伙
        bbutie: null, //收军粮差价补贴费
        wailaijh: null, //收外来人员及家属伙食费
        shengchans: null, //生产收益补贴(上级补)
        shengchanz: null, //生产收益补贴(自补)
        shouruqita: null, //其他收入
        shouruheji: null, //本月收入合计
        xhzhushi: null, //付消耗主食款
        xhfushig: null, //付消耗副食燃料款
        twaichu: null, //付外出退伙人员伙食费与军粮差价
        zhichuqita: null, //其他支出
        zhichuheji: null, //本月支出合计
        jiechao: null, //本月节超
        sjieyu: null, //上月账面累计结余
        leijijiechao: null, //本月累计节超

        bflour: null, //报销小麦
        brice: null, //报销大米
        boil: null, //报销食油
        bbean: null, //报销大豆
        bwhole: null, //报销小计

        sbflour: null, //生产补助小麦
        sbrice: null, //生产补助大米
        sboil: null, //生产补助食油
        sbbean: null, //生产补助大豆
        sbwhole: null, //生产补助小计

        qtsrflour: null, //其他收入小麦
        qtsrrice: null, //其他收入大米
        qtsroil: null, //其他收入食油
        qtsrbean: null, //其他收入大豆
        qtsrwhole: null, //其他收入小计

        hjflour: null, //合计小麦
        hjrice: null, //合计大米
        hjoil: null, //合计食油
        hjbean: null, //合计大豆
        hjwhole: null, //合计小计

        hxflour: null, //伙食消耗小麦
        hxrice: null, //伙食消耗大米
        hxoil: null, //伙食消耗食油
        hxbean: null, //伙食消耗大豆
        hxwhole: null, //伙食消耗小计

        zrflour: null, //自然消耗小麦
        zrrice: null, //自然消耗大米
        zroil: null, //自然消耗食油
        zrbean: null, //自然消耗大豆
        zrwhole: null, //自然消耗小计

        qtzcflour: null, //其他支出小麦
        qtzcrice: null, //其他支出大米
        qtzcoil: null, //其他支出食油
        qtzcbean: null, //其他支出大豆
        qtzcwhole: null, //其他支出小计

        hejixiaohaoflour: null, //合计消耗小麦
        hejixiaohaorice: null, //合计消耗大米
        hejixiaohaooil: null, //合计消耗食油
        hejixiaohaobean: null, //合计消耗大豆
        hejixiaohaowhole: null, //合计消消耗小计

        byjiechaoflour: null, //本月节超小麦
        byjiechaorice: null, //本月节超大米
        byjiechaooil: null, //本月节超食油
        byjiechaobean: null, //本月节超大豆
        byjiechaowhole: null, //本月节超小计

        syljjiechaoflour: null, //上月累计节超小麦
        syljjiechaorice: null, //上月累计节超大米
        syljjiechaooil: null, //上月累计节超食油
        syljjiechaobean: null, //上月累计节超大豆
        syljjiechaowhole: null, //上月累计节超小计

        byljjiechaoflour: null, //本月累计节超小麦
        byljjiechaorice: null, //本月累计节超大米
        byljjiechaooil: null, //本月累计节超食油
        byljjiechaobean: null, //本月累计节超大豆
        byljjiechaowhole: null, //本月累计节超小计

        cqsjflour: null, //存(欠)上级小麦
        cqsjrice: null, //存(欠)上级大米
        cqsjoil: null, //存(欠)上级食油
        cqsjbean: null, //存(欠)上级大豆
        cqsjwhole: null, //存(欠)上级小计

        kcxlflour: null, //库存现粮小麦
        kcxlrice: null, //库存现粮大米
        kcxloil: null, //库存现粮食油
        kcxlbean: null, //库存现粮大豆
        kcxlwhole: null, //库存现粮小计

        kclmflour: null, //库存粮秣小麦
        kclmrice: null, //库存粮秣大米
        kclmoil: null, //库存粮秣食油
        kclmbean: null, //库存粮秣大豆
        kclmwhole: null, //库存粮秣小计
        areatype: null, //类区
        zaobie: null, //灶别
        huoshistandard: null, //伙食费标准(元)
        provisionDifference: null, //购粮补贴
        realjiucantianshu: null, //实际就餐天数
        realkaizhihuoshi: null, //实际开支伙食费
        reallowerstandard: null, //实际低于标准
        yueFoodList: [],
      },
      abstractcode: null, //假的
      // 表头
      columns: [
        {
          title: "序号",
          type: "index",
          align: "center",
          minWidth: 70,
        },
        {
          title: "科目编码",
          key: "subjectcode",
          align: "center",
          minWidth: 100,
        },
        {
          title: "科目名称",
          key: "subjectname",
          align: "center",
          minWidth: 100,
        },
        {
          title: "科目名称",
          key: "subjectfullname",
          align: "center",
          minWidth: 100,
        },
        {
          title: "上年转入（期初余额）",
          align: "center",
          children: [
            {
              title: "收方",
              slot: "snzrrecMoney",
              align: "right",
              minWidth: 100,
            },
            {
              title: "付方",
              slot: "snzrpayMoney",
              align: "right",
              minWidth: 100,
            },
          ],
        },
        {
          title: "本月合计",
          align: "center",
          children: [
            {
              title: "收方",
              slot: "byhjrecMoney",
              align: "right",
              minWidth: 100,
            },
            {
              title: "付方",
              slot: "byhjpayMoney",
              align: "right",
              minWidth: 100,
            },
          ],
        },
        {
          title: "年初以来累计",
          align: "center",
          children: [
            {
              title: "收方",
              slot: "ncljrecMoney",
              align: "right",
              minWidth: 100,
            },
            {
              title: "付方",
              slot: "ncljpayMoney",
              align: "right",
              minWidth: 100,
            },
          ],
        },
        {
          title: "余额",
          align: "center",
          children: [
            {
              title: "收或付",
              slot: "direction",
              align: "center",
              minWidth: 100,
            },
            {
              title: "余额",
              slot: "remainMoney",
              align: "right",
              minWidth: 100,
            },
          ],
        },
      ],
      data: [], // 表格列表
      // 分页
      pages: {
        page: 1,
        pageSize: 10,
        pageTotal: 0,
      },
      timeOptions: {
        disabledDate(date) {
          return (
            date < new Date(new Date().Format("yyyy") - 1 + "-12-31") ||
            date > new Date(new Date().Format("yyyy-MM-dd"))
          );
        },
      },
      tableHeight: 0,
    };
  },
  activated() {
    if (this.$route.query.superior == "home") {
      this.superiorState = true;
    } else {
      this.superiorState = false;
    }
  },
  mounted() {
    setTimeout(() => {
      this.tableHeight =
        document.querySelector(".tableBox").offsetHeight - 24 * 3 - 90; // 表格自适应高度
    }, 100);
    window.addEventListener("resize", this.tableHeightChange, true);
    this.getAccountBookByUserIdApi(); // 根据用户id查询账簿 接口
  },
  destroyed() {
    window.removeEventListener("resize", this.tableHeightChange, true);
  },
  methods: {
    // 千位分割符
    totalPrices(recmoney) {
      const intPart = Math.trunc(recmoney); //整数部分
      let floatPart = 0;
      const intPartFormat = intPart.toString().replace(/\B(?=(\d{3})+$)/g, ",");
      const valuArray = Number(recmoney).toString().split(".");

      if (valuArray.length === 2) {
        //有小数部分
        if (valuArray[1]) {
          if (valuArray[1].length === 1) {
            valuArray[1] += "0";
          }
        } else {
          valuArray[1] = "00";
        }
        floatPart = valuArray[1]; //取得小数部分

        return intPartFormat + "." + floatPart;
      } else {
        return intPartFormat + ".00";
      }
    },
    tableHeightChange() {
      this.tableHeight = 0;
      setTimeout(() => {
        this.tableHeight =
          document.querySelector(".tableBox").offsetHeight - 24 * 3 - 90; // 表格自适应高度
      }, 100);
    },

    // 根据用户id查询账簿 接口
    getAccountBookByUserIdApi() {
      this.form.loading = true;
      return new Promise((resolve) => {
        getAccountBookByUserId({
          userid: this.vuex_user.base.id, // 用户id
        }).then((res) => {
          this.form.loading = false;
          if (res.errorcode === 0) {
            this.selectForm.yearList = res.basAccountbookList;
            this.selectForm.accountbookId =
              res.basAccountbookList[0].accountbookId;
            this.selectForm.year = res.basAccountbookList[0].year; // 账簿年度
            if (this.selectForm.year == new Date().Format("yyyy")) {
              //本年度时 - 用上个月
              if (new Date().Format("MM") == "01") {
                //当是一月份时，要求查看是否有上年的账簿，有则回显上年12月
                this.dataForm.tabledate = new Date().Format("yyyy") + "01-01";
                this.selectForm.yearList.forEach((element) => {
                  if (element.year == new Date().Format("yyyy") - 1) {
                    this.dataForm.tabledate =
                      new Date().Format("yyyy") - 1 + "-12-31";
                    this.selectForm.accountbookId = element.accountbookId;
                    this.selectForm.year = element.year;
                    this.optionDate();
                  }
                });
              } else {
                this.dataForm.tabledate =
                  new Date().Format("yyyy") +
                  "-" +
                  (new Date().Format("MM") - 1) +
                  "-01";
              }
            } else {
              //非本年度时 - 用1月
              this.dataForm.tabledate = this.selectForm.year + "-01-01";
            }
            this.optionDate(); // 限制日期封装方法
            this.getYueHuoShiAndYueFoodApi(); // 查询月伙食公布表(新) 接口
            resolve();
          } else {
            this.$Message.error(res.resultmsg);
            this.dataForm.yueFoodList = [];
            for (let i = 0; i < 15; i++) {
              let a = yueFoodList;
              this.dataForm.yueFoodList.push(a);
            }
          }
        });
      });
    },
    // 查询月伙食公布表(新) 接口
    getYueHuoShiAndYueFoodApi() {
      if (
        new Date(this.dataForm.tabledate).Format("MM") ==
        new Date().Format("MM")
      ) {
        this.$Message.info("当前月份不可编辑月伙食公布表");
        return;
      }
      this.form.loading = true;
      return new Promise((resolve) => {
        getYueHuoShiAndYueFood({
          accountBookId: this.selectForm.accountbookId, //账簿id
          date: new Date(this.dataForm.tabledate).Format("yyyy-MM-dd"), //查询月份(格式:yyyy-MM)
        }).then((res) => {
          this.form.loading = false;
          if (res.retCode === 0) {
            this.selectForm.yuehuoshiId = res.data.yuehuoshiId; //月伙食公布表id
            this.dataForm.accountbookId = res.data.accountbookId; //账簿ID
            this.dataForm.yuehuoshiId = res.data.yuehuoshiId; //月伙食公布表id(添加时不传)

            this.dataForm.operator = res.data.operator; //提交人
            this.dataForm.operatorid = res.data.operatorid; //提交人ID
            this.dataForm.tablename = res.data.tablename;
            this.dataForm.bhuoshifei = res.data.bhuoshifei; //收报销伙食费
            this.dataForm.jiaohuo = res.data.jiaohuo; //收本单位军官交伙
            this.dataForm.bbutie = res.data.bbutie; //收军粮差价补贴费
            this.dataForm.wailaijh = res.data.wailaijh; //收外来人员及家属伙食费
            this.dataForm.shengchans = res.data.shengchans; //生产收益补贴(上级补)
            this.dataForm.shengchanz = res.data.shengchanz; //生产收益补贴(自补)
            this.dataForm.shouruqita = res.data.shouruqita; //其他收入
            this.dataForm.shouruheji = res.data.shouruheji; //本月收入合计
            this.dataForm.xhzhushi = res.data.xhzhushi; //付消耗主食款
            this.dataForm.xhfushig = res.data.xhfushig; //付消耗副食燃料款
            this.dataForm.twaichu = res.data.twaichu; //付外出退伙人员伙食费与军粮差价
            this.dataForm.zhichuqita = res.data.zhichuqita; //其他支出
            this.dataForm.zhichuheji = res.data.zhichuheji; //本月支出合计
            this.dataForm.jiechao = res.data.jiechao; //本月节超
            this.dataForm.sjieyu = res.data.sjieyu; //上月账面累计结余
            this.dataForm.leijijiechao = res.data.leijijiechao; //本月累计节超
            this.dataForm.bflour = res.data.bflour; //报销小麦
            this.dataForm.brice = res.data.brice; //报销大米
            this.dataForm.boil = res.data.boil; //报销食油
            this.dataForm.bbean = res.data.bbean; //报销大豆
            this.dataForm.bwhole = res.data.bwhole; //报销小计
            this.dataForm.sbflour = res.data.sbflour; //生产补助小麦
            this.dataForm.sbrice = res.data.sbrice; //生产补助大米
            this.dataForm.sboil = res.data.sboil; //生产补助食油
            this.dataForm.sbbean = res.data.sbbean; //生产补助大豆
            this.dataForm.sbwhole = res.data.sbwhole; //生产补助小计
            this.dataForm.qtsrflour = res.data.qtsrflour; //其他收入小麦
            this.dataForm.qtsrrice = res.data.qtsrrice; //其他收入大米
            this.dataForm.qtsroil = res.data.qtsroil; //其他收入食油
            this.dataForm.qtsrbean = res.data.qtsrbean; //其他收入大豆
            this.dataForm.qtsrwhole = res.data.qtsrwhole; //其他收入小计
            this.dataForm.hjflour = res.data.hjflour; //合计小麦
            this.dataForm.hjrice = res.data.hjrice; //合计大米
            this.dataForm.hjoil = res.data.hjoil; //合计食油
            this.dataForm.hjbean = res.data.hjbean; //合计大豆
            this.dataForm.hjwhole = res.data.hjwhole; //合计小计
            this.dataForm.hxflour = res.data.hxflour; //伙食消耗小麦
            this.dataForm.hxrice = res.data.hxrice; //伙食消耗大米
            this.dataForm.hxoil = res.data.hxoil; //伙食消耗食油
            this.dataForm.hxbean = res.data.hxbean; //伙食消耗大豆
            this.dataForm.hxwhole = res.data.hxwhole; //伙食消耗小计
            this.dataForm.zrflour = res.data.zrflour; //自然消耗小麦
            this.dataForm.zrrice = res.data.zrrice; //自然消耗大米
            this.dataForm.zroil = res.data.zroil; //自然消耗食油
            this.dataForm.zrbean = res.data.zrbean; //自然消耗大豆
            this.dataForm.zrwhole = res.data.zrwhole; //自然消耗小计
            this.dataForm.qtzcflour = res.data.qtzcflour; //其他支出小麦
            this.dataForm.qtzcrice = res.data.qtzcrice; //其他支出大米
            this.dataForm.qtzcoil = res.data.qtzcoil; //其他支出食油
            this.dataForm.qtzcbean = res.data.qtzcbean; //其他支出大豆
            this.dataForm.qtzcwhole = res.data.qtzcwhole; //其他支出小计
            this.dataForm.hejixiaohaoflour = res.data.hejixiaohaoflour; //合计消耗小麦
            this.dataForm.hejixiaohaorice = res.data.hejixiaohaorice; //合计消耗大米
            this.dataForm.hejixiaohaooil = res.data.hejixiaohaooil; //合计消耗食油
            this.dataForm.hejixiaohaobean = res.data.hejixiaohaobean; //合计消耗大豆
            this.dataForm.hejixiaohaowhole = res.data.hejixiaohaowhole; //合计消消耗小计
            this.dataForm.byjiechaoflour = res.data.byjiechaoflour; //本月节超小麦
            this.dataForm.byjiechaorice = res.data.byjiechaorice; //本月节超大米
            this.dataForm.byjiechaooil = res.data.byjiechaooil; //本月节超食油
            this.dataForm.byjiechaobean = res.data.byjiechaobean; //本月节超大豆
            this.dataForm.byjiechaowhole = res.data.byjiechaowhole; //本月节超小计
            this.dataForm.syljjiechaoflour = res.data.syljjiechaoflour; //上月累计节超小麦
            this.dataForm.syljjiechaorice = res.data.syljjiechaorice; //上月累计节超大米
            this.dataForm.syljjiechaooil = res.data.syljjiechaooil; //上月累计节超食油
            this.dataForm.syljjiechaobean = res.data.syljjiechaobean; //上月累计节超大豆
            this.dataForm.syljjiechaowhole = res.data.syljjiechaowhole; //上月累计节超小计
            this.dataForm.byljjiechaoflour = res.data.byljjiechaoflour; //本月累计节超小麦
            this.dataForm.byljjiechaorice = res.data.byljjiechaorice; //本月累计节超大米
            this.dataForm.byljjiechaooil = res.data.byljjiechaooil; //本月累计节超食油
            this.dataForm.byljjiechaobean = res.data.byljjiechaobean; //本月累计节超大豆
            this.dataForm.byljjiechaowhole = res.data.byljjiechaowhole; //本月累计节超小计
            this.dataForm.cqsjflour = res.data.cqsjflour; //存(欠)上级小麦
            this.dataForm.cqsjrice = res.data.cqsjrice; //存(欠)上级大米
            this.dataForm.cqsjoil = res.data.cqsjoil; //存(欠)上级食油
            this.dataForm.cqsjbean = res.data.cqsjbean; //存(欠)上级大豆
            this.dataForm.cqsjwhole = res.data.cqsjwhole; //存(欠)上级小计
            this.dataForm.kcxlflour = res.data.kcxlflour; //库存现粮小麦
            this.dataForm.kcxlrice = res.data.kcxlrice; //库存现粮大米
            this.dataForm.kcxloil = res.data.kcxloil; //库存现粮食油
            this.dataForm.kcxlbean = res.data.kcxlbean; //库存现粮大豆
            this.dataForm.kcxlwhole = res.data.kcxlwhole; //库存现粮小计
            this.dataForm.kclmflour = res.data.kclmflour; //库存粮秣小麦
            this.dataForm.kclmrice = res.data.kclmrice; //库存粮秣大米
            this.dataForm.kclmoil = res.data.kclmoil; //库存粮秣食油
            this.dataForm.kclmbean = res.data.kclmbean; //库存粮秣大豆
            this.dataForm.kclmwhole = res.data.kclmwhole; //库存粮秣小计
            this.dataForm.areatype = res.data.areatype; //类区
            this.dataForm.zaobie = res.data.zaobie; //灶别
            this.dataForm.huoshistandard = res.data.huoshistandard; //伙食费标准(元)
            this.dataForm.provisionDifference = res.data.provisionDifference; //购粮补贴
            this.dataForm.realjiucantianshu = res.data.realjiucantianshu; //实际就餐天数
            this.dataForm.realkaizhihuoshi = res.data.realkaizhihuoshi; //实际开支伙食费
            this.dataForm.reallowerstandard = res.data.reallowerstandard; //实际低于标准
            this.dataForm.yueFoodList = res.data.yueFoodList;
            resolve();
          } else {
            this.$Message.error(res.retMsg);
          }
        });
      });
    },

    // 添加/修改月伙食公布表 接口
    saveYueHuoShiAndYueFoodApi() {
      if (
        new Date(this.dataForm.tabledate).Format("MM") ==
        new Date().Format("MM")
      ) {
        this.$Message.info("当前月份不可编辑月伙食公布表");
        return;
      }
      this.form.loading = true;
      return new Promise((resolve) => {
        saveYueHuoShiAndYueFood({
          accountbookId:
            this.dataForm.accountbookId != null
              ? this.dataForm.accountbookId
              : this.selectForm.accountbookId, //账簿ID
          operator: this.dataForm.operator, //提交人
          operatorid: this.dataForm.operatorid, //提交人ID
          tablename: this.dataForm.tablename, //表名
          yuehuoshiId: this.dataForm.yuehuoshiId, //月伙食公布表id(添加时不传)
          tabledate: new Date(this.dataForm.tabledate).Format("yyyy-MM-dd"), //日期(格式:yyyy-MM-dd)
          bhuoshifei: this.dataForm.bhuoshifei, //收报销伙食费
          jiaohuo: this.dataForm.jiaohuo, //收本单位军官交伙
          bbutie: this.dataForm.bbutie, //收军粮差价补贴费
          wailaijh: this.dataForm.wailaijh, //收外来人员及家属伙食费
          shengchans: this.dataForm.shengchans, //生产收益补贴(上级补)
          shengchanz: this.dataForm.shengchanz, //生产收益补贴(自补)
          shouruqita: this.dataForm.shouruqita, //其他收入
          shouruheji: this.dataForm.shouruheji, //本月收入合计
          xhzhushi: this.dataForm.xhzhushi, //付消耗主食款
          xhfushig: this.dataForm.xhfushig, //付消耗副食燃料款
          twaichu: this.dataForm.twaichu, //付外出退伙人员伙食费与军粮差价
          zhichuqita: this.dataForm.zhichuqita, //其他支出
          zhichuheji: this.dataForm.zhichuheji, //本月支出合计
          jiechao: this.dataForm.jiechao, //本月节超
          sjieyu: this.dataForm.sjieyu, //上月账面累计结余
          leijijiechao: this.dataForm.leijijiechao, //本月累计节超
          bflour: this.dataForm.bflour, //报销小麦
          brice: this.dataForm.brice, //报销大米
          boil: this.dataForm.boil, //报销食油
          bbean: this.dataForm.bbean, //报销大豆
          bwhole: this.dataForm.bwhole, //报销小计
          sbflour: this.dataForm.sbflour, //生产补助小麦
          sbrice: this.dataForm.sbrice, //生产补助大米
          sboil: this.dataForm.sboil, //生产补助食油
          sbbean: this.dataForm.sbbean, //生产补助大豆
          sbwhole: this.dataForm.sbwhole, //生产补助小计
          qtsrflour: this.dataForm.qtsrflour, //其他收入小麦
          qtsrrice: this.dataForm.qtsrrice, //其他收入大米
          qtsroil: this.dataForm.qtsroil, //其他收入食油
          qtsrbean: this.dataForm.qtsrbean, //其他收入大豆
          qtsrwhole: this.dataForm.qtsrwhole, //其他收入小计
          hjflour: this.dataForm.hjflour, //合计小麦
          hjrice: this.dataForm.hjrice, //合计大米
          hjoil: this.dataForm.hjoil, //合计食油
          hjbean: this.dataForm.hjbean, //合计大豆
          hjwhole: this.dataForm.hjwhole, //合计小计
          hxflour: this.dataForm.hxflour, //伙食消耗小麦
          hxrice: this.dataForm.hxrice, //伙食消耗大米
          hxoil: this.dataForm.hxoil, //伙食消耗食油
          hxbean: this.dataForm.hxbean, //伙食消耗大豆
          hxwhole: this.dataForm.hxwhole, //伙食消耗小计
          zrflour: this.dataForm.zrflour, //自然消耗小麦
          zrrice: this.dataForm.zrrice, //自然消耗大米
          zroil: this.dataForm.zroil, //自然消耗食油
          zrbean: this.dataForm.zrbean, //自然消耗大豆
          zrwhole: this.dataForm.zrwhole, //自然消耗小计
          qtzcflour: this.dataForm.qtzcflour, //其他支出小麦
          qtzcrice: this.dataForm.qtzcrice, //其他支出大米
          qtzcoil: this.dataForm.qtzcoil, //其他支出食油
          qtzcbean: this.dataForm.qtzcbean, //其他支出大豆
          qtzcwhole: this.dataForm.qtzcwhole, //其他支出小计
          hejixiaohaoflour: this.dataForm.hejixiaohaoflour, //合计消耗小麦
          hejixiaohaorice: this.dataForm.hejixiaohaorice, //合计消耗大米
          hejixiaohaooil: this.dataForm.hejixiaohaooil, //合计消耗食油
          hejixiaohaobean: this.dataForm.hejixiaohaobean, //合计消耗大豆
          hejixiaohaowhole: this.dataForm.hejixiaohaowhole, //合计消消耗小计
          byjiechaoflour: this.dataForm.byjiechaoflour, //本月节超小麦
          byjiechaorice: this.dataForm.byjiechaorice, //本月节超大米
          byjiechaooil: this.dataForm.byjiechaooil, //本月节超食油
          byjiechaobean: this.dataForm.byjiechaobean, //本月节超大豆
          byjiechaowhole: this.dataForm.byjiechaowhole, //本月节超小计
          syljjiechaoflour: this.dataForm.syljjiechaoflour, //上月累计节超小麦
          syljjiechaorice: this.dataForm.syljjiechaorice, //上月累计节超大米
          syljjiechaooil: this.dataForm.syljjiechaooil, //上月累计节超食油
          syljjiechaobean: this.dataForm.syljjiechaobean, //上月累计节超大豆
          syljjiechaowhole: this.dataForm.syljjiechaowhole, //上月累计节超小计
          byljjiechaoflour: this.dataForm.byljjiechaoflour, //本月累计节超小麦
          byljjiechaorice: this.dataForm.byljjiechaorice, //本月累计节超大米
          byljjiechaooil: this.dataForm.byljjiechaooil, //本月累计节超食油
          byljjiechaobean: this.dataForm.byljjiechaobean, //本月累计节超大豆
          byljjiechaowhole: this.dataForm.byljjiechaowhole, //本月累计节超小计
          cqsjflour: this.dataForm.cqsjflour, //存(欠)上级小麦
          cqsjrice: this.dataForm.cqsjrice, //存(欠)上级大米
          cqsjoil: this.dataForm.cqsjoil, //存(欠)上级食油
          cqsjbean: this.dataForm.cqsjbean, //存(欠)上级大豆
          cqsjwhole: this.dataForm.cqsjwhole, //存(欠)上级小计
          kcxlflour: this.dataForm.kcxlflour, //库存现粮小麦
          kcxlrice: this.dataForm.kcxlrice, //库存现粮大米
          kcxloil: this.dataForm.kcxloil, //库存现粮食油
          kcxlbean: this.dataForm.kcxlbean, //库存现粮大豆
          kcxlwhole: this.dataForm.kcxlwhole, //库存现粮小计
          kclmflour: this.dataForm.kclmflour, //库存粮秣小麦
          kclmrice: this.dataForm.kclmrice, //库存粮秣大米
          kclmoil: this.dataForm.kclmoil, //库存粮秣食油
          kclmbean: this.dataForm.kclmbean, //库存粮秣大豆
          kclmwhole: this.dataForm.kclmwhole, //库存粮秣小计
          areatype: this.dataForm.areatype, //类区
          zaobie: this.dataForm.zaobie, //灶别
          huoshistandard: this.dataForm.huoshistandard, //伙食费标准(元)
          provisionDifference: this.dataForm.provisionDifference, //购粮补贴
          realjiucantianshu: this.dataForm.realjiucantianshu, //实际就餐天数
          realkaizhihuoshi: this.dataForm.realkaizhihuoshi, //实际开支伙食费
          reallowerstandard: this.dataForm.reallowerstandard, //实际低于标准
          yueFoodList: this.dataForm.yueFoodList,
        }).then((res) => {
          this.form.loading = false;
          if (res.retCode === 0) {
            this.getYueHuoShiAndYueFoodApi(); // 查询月伙食公布表(新) 接口
            this.$Message.success(res.retMsg);
            resolve();
          } else {
            this.$Message.error(res.retMsg);
          }
        });
      });
    },

    // 生成月伙食公布表 接口
    createYueHuoShiApi() {
      this.form.loading = true;
      return new Promise((resolve) => {
        createYueHuoShi({
          accountBookId: this.selectForm.accountbookId, //账簿ID
          date: new Date(this.dataForm.tabledate).Format("yyyy-MM-dd"), //生成伙食公布表的月份(格式:yyyy-MM-dd)
        }).then((res) => {
          this.form.loading = false;
          if (res.retCode === 0) {
            this.dataForm.accountbookId = res.data.accountbookId; //账簿ID
            this.dataForm.yuehuoshiId = res.data.yuehuoshiId; //月伙食公布表id(添加时不传)
            this.dataForm.operator = res.data.operator; //提交人
            this.dataForm.operatorid = res.data.operatorid; //提交人ID
            this.dataForm.tablename = res.data.tablename;
            this.dataForm.bhuoshifei = res.data.bhuoshifei; //收报销伙食费
            this.dataForm.jiaohuo = res.data.jiaohuo; //收本单位军官交伙
            this.dataForm.bbutie = res.data.bbutie; //收军粮差价补贴费
            this.dataForm.wailaijh = res.data.wailaijh; //收外来人员及家属伙食费
            this.dataForm.shengchans = res.data.shengchans; //生产收益补贴(上级补)
            this.dataForm.shengchanz = res.data.shengchanz; //生产收益补贴(自补)
            this.dataForm.shouruqita = res.data.shouruqita; //其他收入
            this.dataForm.shouruheji = res.data.shouruheji; //本月收入合计
            this.dataForm.xhzhushi = res.data.xhzhushi; //付消耗主食款
            this.dataForm.xhfushig = res.data.xhfushig; //付消耗副食燃料款
            this.dataForm.twaichu = res.data.twaichu; //付外出退伙人员伙食费与军粮差价
            this.dataForm.zhichuqita = res.data.zhichuqita; //其他支出
            this.dataForm.zhichuheji = res.data.zhichuheji; //本月支出合计
            this.dataForm.jiechao = res.data.jiechao; //本月节超
            this.dataForm.sjieyu = res.data.sjieyu; //上月账面累计结余
            this.dataForm.leijijiechao = res.data.leijijiechao; //本月累计节超
            this.dataForm.bflour = res.data.bflour; //报销小麦
            this.dataForm.brice = res.data.brice; //报销大米
            this.dataForm.boil = res.data.boil; //报销食油
            this.dataForm.bbean = res.data.bbean; //报销大豆
            this.dataForm.bwhole = res.data.bwhole; //报销小计
            this.dataForm.sbflour = res.data.sbflour; //生产补助小麦
            this.dataForm.sbrice = res.data.sbrice; //生产补助大米
            this.dataForm.sboil = res.data.sboil; //生产补助食油
            this.dataForm.sbbean = res.data.sbbean; //生产补助大豆
            this.dataForm.sbwhole = res.data.sbwhole; //生产补助小计
            this.dataForm.qtsrflour = res.data.qtsrflour; //其他收入小麦
            this.dataForm.qtsrrice = res.data.qtsrrice; //其他收入大米
            this.dataForm.qtsroil = res.data.qtsroil; //其他收入食油
            this.dataForm.qtsrbean = res.data.qtsrbean; //其他收入大豆
            this.dataForm.qtsrwhole = res.data.qtsrwhole; //其他收入小计
            this.dataForm.hjflour = res.data.hjflour; //合计小麦
            this.dataForm.hjrice = res.data.hjrice; //合计大米
            this.dataForm.hjoil = res.data.hjoil; //合计食油
            this.dataForm.hjbean = res.data.hjbean; //合计大豆
            this.dataForm.hjwhole = res.data.hjwhole; //合计小计
            this.dataForm.hxflour = res.data.hxflour; //伙食消耗小麦
            this.dataForm.hxrice = res.data.hxrice; //伙食消耗大米
            this.dataForm.hxoil = res.data.hxoil; //伙食消耗食油
            this.dataForm.hxbean = res.data.hxbean; //伙食消耗大豆
            this.dataForm.hxwhole = res.data.hxwhole; //伙食消耗小计
            this.dataForm.zrflour = res.data.zrflour; //自然消耗小麦
            this.dataForm.zrrice = res.data.zrrice; //自然消耗大米
            this.dataForm.zroil = res.data.zroil; //自然消耗食油
            this.dataForm.zrbean = res.data.zrbean; //自然消耗大豆
            this.dataForm.zrwhole = res.data.zrwhole; //自然消耗小计
            this.dataForm.qtzcflour = res.data.qtzcflour; //其他支出小麦
            this.dataForm.qtzcrice = res.data.qtzcrice; //其他支出大米
            this.dataForm.qtzcoil = res.data.qtzcoil; //其他支出食油
            this.dataForm.qtzcbean = res.data.qtzcbean; //其他支出大豆
            this.dataForm.qtzcwhole = res.data.qtzcwhole; //其他支出小计
            this.dataForm.hejixiaohaoflour = res.data.hejixiaohaoflour; //合计消耗小麦
            this.dataForm.hejixiaohaorice = res.data.hejixiaohaorice; //合计消耗大米
            this.dataForm.hejixiaohaooil = res.data.hejixiaohaooil; //合计消耗食油
            this.dataForm.hejixiaohaobean = res.data.hejixiaohaobean; //合计消耗大豆
            this.dataForm.hejixiaohaowhole = res.data.hejixiaohaowhole; //合计消消耗小计
            this.dataForm.byjiechaoflour = res.data.byjiechaoflour; //本月节超小麦
            this.dataForm.byjiechaorice = res.data.byjiechaorice; //本月节超大米
            this.dataForm.byjiechaooil = res.data.byjiechaooil; //本月节超食油
            this.dataForm.byjiechaobean = res.data.byjiechaobean; //本月节超大豆
            this.dataForm.byjiechaowhole = res.data.byjiechaowhole; //本月节超小计
            this.dataForm.syljjiechaoflour = res.data.syljjiechaoflour; //上月累计节超小麦
            this.dataForm.syljjiechaorice = res.data.syljjiechaorice; //上月累计节超大米
            this.dataForm.syljjiechaooil = res.data.syljjiechaooil; //上月累计节超食油
            this.dataForm.syljjiechaobean = res.data.syljjiechaobean; //上月累计节超大豆
            this.dataForm.syljjiechaowhole = res.data.syljjiechaowhole; //上月累计节超小计
            this.dataForm.byljjiechaoflour = res.data.byljjiechaoflour; //本月累计节超小麦
            this.dataForm.byljjiechaorice = res.data.byljjiechaorice; //本月累计节超大米
            this.dataForm.byljjiechaooil = res.data.byljjiechaooil; //本月累计节超食油
            this.dataForm.byljjiechaobean = res.data.byljjiechaobean; //本月累计节超大豆
            this.dataForm.byljjiechaowhole = res.data.byljjiechaowhole; //本月累计节超小计
            this.dataForm.cqsjflour = res.data.cqsjflour; //存(欠)上级小麦
            this.dataForm.cqsjrice = res.data.cqsjrice; //存(欠)上级大米
            this.dataForm.cqsjoil = res.data.cqsjoil; //存(欠)上级食油
            this.dataForm.cqsjbean = res.data.cqsjbean; //存(欠)上级大豆
            this.dataForm.cqsjwhole = res.data.cqsjwhole; //存(欠)上级小计
            this.dataForm.kcxlflour = res.data.kcxlflour; //库存现粮小麦
            this.dataForm.kcxlrice = res.data.kcxlrice; //库存现粮大米
            this.dataForm.kcxloil = res.data.kcxloil; //库存现粮食油
            this.dataForm.kcxlbean = res.data.kcxlbean; //库存现粮大豆
            this.dataForm.kcxlwhole = res.data.kcxlwhole; //库存现粮小计
            this.dataForm.kclmflour = res.data.kclmflour; //库存粮秣小麦
            this.dataForm.kclmrice = res.data.kclmrice; //库存粮秣大米
            this.dataForm.kclmoil = res.data.kclmoil; //库存粮秣食油
            this.dataForm.kclmbean = res.data.kclmbean; //库存粮秣大豆
            this.dataForm.kclmwhole = res.data.kclmwhole; //库存粮秣小计
            this.dataForm.areatype = res.data.areatype; //类区
            this.dataForm.zaobie = res.data.zaobie; //灶别
            this.dataForm.huoshistandard = res.data.huoshistandard; //伙食费标准(元)
            this.dataForm.provisionDifference = res.data.provisionDifference; //购粮补贴
            this.dataForm.realjiucantianshu = res.data.realjiucantianshu; //实际就餐天数
            this.dataForm.realkaizhihuoshi = res.data.realkaizhihuoshi; //实际开支伙食费
            this.dataForm.reallowerstandard = res.data.reallowerstandard; //实际低于标准
            this.dataForm.yueFoodList = res.data.yueFoodList;
            this.$Message.success(res.retMsg);
            resolve();
          } else {
            this.$Message.error(res.retMsg);
            this.dataForm.yueFoodList = [];
            for (let i = 0; i < 15; i++) {
              let a = yueFoodList;
              this.dataForm.yueFoodList.push(a);
            }
          }
        });
      });
    },
    // 月伙食公布表导出(新) 接口
    getExcelExportByIdApi() {
      this.form.loading = true;
      return new Promise((resolve) => {
        getExcelExportById({
          yuehuoshiId: this.selectForm.yuehuoshiId, // 月伙食公布表id
        }).then((res) => {
          this.form.loading = false;
          if (res.retCode === 0) {
            this.downloads(res.data);
            this.$Message.success(res.retMsg);
            resolve();
          } else {
            this.$Message.error(res.retMsg);
          }
        });
      });
    },
    // 账簿年度改变回调
    accountbookIdChange() {
      this.pages.page = 1;
      this.selectForm.yearList.forEach((element) => {
        if (element.accountbookId === this.selectForm.accountbookId) {
          this.selectForm.year = element.year;
          if (this.selectForm.year == new Date().Format("yyyy")) {
            //本年度时
            if (new Date().Format("MM") == "01") {
              //当是一月份时，要求查看是否有上年的账簿，有则回显上年12月
              this.dataForm.tabledate = new Date().Format("yyyy") + "01-01";
              this.selectForm.yearList.forEach((element) => {
                if (element.year == new Date().Format("yyyy") - 1) {
                  this.dataForm.tabledate =
                    new Date().Format("yyyy") - 1 + "-12-31";
                  this.selectForm.accountbookId = element.accountbookId;
                  this.selectForm.year = element.year;
                  this.optionDate();
                }
              });
            } else {
              this.dataForm.tabledate =
                new Date().Format("yyyy") +
                "-" +
                (new Date().Format("MM") - 1) +
                "-01";
            }
          } else {
            //非本年度时 - 用1月
            this.dataForm.tabledate = this.selectForm.year + "-01-01";
          }
          this.optionDate(); // 限制日期封装方法
        }
      });
    },

    // 限制日期封装方法
    optionDate() {
      if (this.selectForm.year == new Date().Format("yyyy")) {
        // 本年度 - 限制：1月~当前月（不能跨年）
        if (new Date().Format("MM") == "01") {
          this.timeOptions = {
            disabledDate(value) {
              return (
                value < new Date(new Date().Format("yyyy") - 1 + "-12-31") ||
                value > new Date(new Date().Format("yyyy") + "-01-31")
              );
            },
          };
        } else {
          let timess = new Date().Format("yyyy-MM-dd");
          let yearTime = new Date(timess).Format("yyyy");
          let monthTime = new Date(timess).Format("MM") - 1; //上个月
          let enddataTime = new Date(yearTime, monthTime, 0).getDate(); // 获取上个月最后一天的日 28或29或30或31....
          let endTimes = yearTime + "-" + monthTime + "-" + enddataTime; // 月末
          this.timeOptions = {
            disabledDate(value) {
              return (
                value < new Date(new Date().Format("yyyy") - 1 + "-12-31") ||
                value > new Date(endTimes)
              );
            },
          };
        }
      } else {
        // 非本年度 - 限制：1月~12月（不能跨年）
        let startOption = Number(this.selectForm.year) - 1 + "-12-31"; // 限制开始能点日期 必须先建变量存储，才能放进new Date()
        let endOption = Number(this.selectForm.year) + "-12-31"; // 限制结束能点日期 必须先建变量存储，才能放进new Date()
        this.timeOptions = {
          disabledDate(value) {
            return value < new Date(startOption) || value > new Date(endOption);
          },
        };
      }
    },

    // 查询日期改变回调-每次变更，获取当前月头与月末
    getStartAndEnd(valueData) {},
    // 收（付）金额改变回调
    oneAllMoneyChange() {},
    QuanPing() {
      this.$refs["QuanPingOne"].show = true; // 关闭伙食费余额变动曲线图弹框
    },
    // 添加科目表单验证
    QuanPingOK() {
      this.$refs["QuanPingOne"].show = false; // 关闭伙食费余额变动曲线图弹框
    },

    // 伙食费表格-本月收入合计方法
    HsfBysrhjSun() {
      this.dataForm.shouruheji =
        this.dataForm.bhuoshifei +
        this.dataForm.jiaohuo +
        this.dataForm.bbutie +
        this.dataForm.wailaijh +
        this.dataForm.shengchans +
        this.dataForm.shengchanz +
        this.dataForm.shouruqita;
      this.dataForm.jiechao =
        this.dataForm.shouruheji - this.dataForm.zhichuheji;
      this.dataForm.leijijiechao = this.dataForm.jiechao + this.dataForm.sjieyu;
    },
    // 伙食费表格-本月支出合计方法
    HsfByzchjSun() {
      this.dataForm.zhichuheji =
        this.dataForm.xhzhushi +
        this.dataForm.xhfushig +
        this.dataForm.twaichu +
        this.dataForm.zhichuqita;
      this.dataForm.realkaizhihuoshi =
        (this.dataForm.zhichuheji - this.dataForm.twaichu) /
        this.dataForm.realjiucantianshu;
      this.dataForm.reallowerstandard =
        this.dataForm.realkaizhihuoshi -
        this.dataForm.huoshistandard -
        this.dataForm.provisionDifference;
      this.dataForm.jiechao =
        this.dataForm.shouruheji - this.dataForm.zhichuheji;
      this.dataForm.leijijiechao = this.dataForm.jiechao + this.dataForm.sjieyu;
    },

    // 粮食表格-本月收入-报销粮食合计方法
    LsBysrBxlsHjSun() {
      this.dataForm.bwhole =
        this.dataForm.bflour +
        this.dataForm.brice +
        this.dataForm.boil +
        this.dataForm.bbean;
      this.LsBysrXmfHjSun(); // 粮食表格-本月收入-小麦粉合计方法
      this.LsBysrDmHjSun(); // 粮食表格-本月收入-大米合计方法
      this.LsBysrSyHjSun(); // 粮食表格-本月收入-食油合计方法
      this.LsBysrDdHjSun(); // 粮食表格-本月收入-大豆合计方法
    },
    // 粮食表格-本月收入-收生产补助粮合计方法
    LsBysrSscbzlHjSun() {
      this.dataForm.sbwhole =
        this.dataForm.sbflour +
        this.dataForm.sbrice +
        this.dataForm.sboil +
        this.dataForm.sbbean;
      this.LsBysrXmfHjSun(); // 粮食表格-本月收入-小麦粉合计方法
      this.LsBysrDmHjSun(); // 粮食表格-本月收入-大米合计方法
      this.LsBysrSyHjSun(); // 粮食表格-本月收入-食油合计方法
      this.LsBysrDdHjSun(); // 粮食表格-本月收入-大豆合计方法
    },
    // 粮食表格-本月收入-其他合计方法
    LsBysrQtHjSun() {
      this.dataForm.qtsrwhole =
        this.dataForm.qtsrflour +
        this.dataForm.qtsrrice +
        this.dataForm.qtsroil +
        this.dataForm.qtsrbean;
      this.LsBysrXmfHjSun(); // 粮食表格-本月收入-小麦粉合计方法
      this.LsBysrDmHjSun(); // 粮食表格-本月收入-大米合计方法
      this.LsBysrSyHjSun(); // 粮食表格-本月收入-食油合计方法
      this.LsBysrDdHjSun(); // 粮食表格-本月收入-大豆合计方法
    },

    // 粮食表格-本月收入-小麦粉合计方法
    LsBysrXmfHjSun() {
      this.dataForm.hjflour =
        this.dataForm.bflour + this.dataForm.sbflour + this.dataForm.qtsrflour;
      this.dataForm.byjiechaoflour =
        this.dataForm.hjflour - this.dataForm.hejixiaohaoflour;
      this.dataForm.byljjiechaoflour =
        this.dataForm.byjiechaoflour + this.dataForm.syljjiechaoflour;
      this.LsBysrHjHjSun(); // 粮食表格-本月收入-合计（千克）合计方法
    },
    // 粮食表格-本月收入-大米合计方法
    LsBysrDmHjSun() {
      this.dataForm.hjrice =
        this.dataForm.brice + this.dataForm.sbrice + this.dataForm.qtsrrice;
      this.dataForm.byjiechaorice =
        this.dataForm.hjrice - this.dataForm.hejixiaohaorice;
      this.dataForm.byljjiechaorice =
        this.dataForm.byjiechaorice + this.dataForm.syljjiechaorice;
      this.LsBysrHjHjSun(); // 粮食表格-本月收入-合计（千克）合计方法
    },
    // 粮食表格-本月收入-食油合计方法
    LsBysrSyHjSun() {
      this.dataForm.hjoil =
        this.dataForm.boil + this.dataForm.sboil + this.dataForm.qtsroil;
      this.dataForm.byjiechaooil =
        this.dataForm.hjoil - this.dataForm.hejixiaohaooil;
      this.dataForm.byljjiechaooil =
        this.dataForm.byjiechaooil + this.dataForm.syljjiechaooil;
      this.LsBysrHjHjSun(); // 粮食表格-本月收入-合计（千克）合计方法
    },
    // 粮食表格-本月收入-大豆合计方法
    LsBysrDdHjSun() {
      this.dataForm.hjbean =
        this.dataForm.bbean + this.dataForm.sbbean + this.dataForm.qtsrbean;
      this.dataForm.byjiechaobean =
        this.dataForm.hjbean - this.dataForm.hejixiaohaobean;
      this.dataForm.byljjiechaobean =
        this.dataForm.byjiechaobean + this.dataForm.syljjiechaobean;
      this.LsBysrHjHjSun(); // 粮食表格-本月收入-合计（千克）合计方法
    },

    // 粮食表格-本月收入-合计（千克）合计方法
    LsBysrHjHjSun() {
      this.dataForm.hjwhole =
        this.dataForm.hjflour +
        this.dataForm.hjrice +
        this.dataForm.hjoil +
        this.dataForm.hjbean;
      this.dataForm.byjiechaowhole =
        this.dataForm.hjwhole - this.dataForm.hejixiaohaowhole;
      this.dataForm.byljjiechaowhole =
        this.dataForm.byjiechaowhole + this.dataForm.syljjiechaowhole;
    },

    // 粮食表格-本月支出-付伙食消耗粮合计方法
    LsByzcFhsxhlHjSun() {
      this.dataForm.hxwhole =
        this.dataForm.hxflour +
        this.dataForm.hxrice +
        this.dataForm.hxoil +
        this.dataForm.hxbean;
      this.LsByzcXmfHjSun(); // 粮食表格-本月支出-小麦粉合计方法
      this.LsByzcDmHjSun(); // 粮食表格-本月支出-大米合计方法
      this.LsByzcSyHjSun(); // 粮食表格-本月支出-食油合计方法
      this.LsByzcDdHjSun(); // 粮食表格-本月支出-大豆合计方法
    },
    // 粮食表格-本月支出-付自然损耗粮合计方法
    LsByzcFzrxhlHjSun() {
      this.dataForm.zrwhole =
        this.dataForm.zrflour +
        this.dataForm.zrrice +
        this.dataForm.zroil +
        this.dataForm.zrbean;
      this.LsByzcXmfHjSun(); // 粮食表格-本月支出-小麦粉合计方法
      this.LsByzcDmHjSun(); // 粮食表格-本月支出-大米合计方法
      this.LsByzcSyHjSun(); // 粮食表格-本月支出-食油合计方法
      this.LsByzcDdHjSun(); // 粮食表格-本月支出-大豆合计方法
    },
    // 粮食表格-本月支出-其他合计方法
    LsByzcQtHjSun() {
      this.dataForm.qtzcwhole =
        this.dataForm.qtzcflour +
        this.dataForm.qtzcrice +
        this.dataForm.qtzcoil +
        this.dataForm.qtzcbean;
      this.LsByzcXmfHjSun(); // 粮食表格-本月支出-小麦粉合计方法
      this.LsByzcDmHjSun(); // 粮食表格-本月支出-大米合计方法
      this.LsByzcSyHjSun(); // 粮食表格-本月支出-食油合计方法
      this.LsByzcDdHjSun(); // 粮食表格-本月支出-大豆合计方法
    },

    // 粮食表格-本月支出-小麦粉合计方法
    LsByzcXmfHjSun() {
      this.dataForm.hejixiaohaoflour =
        this.dataForm.hxflour + this.dataForm.zrflour + this.dataForm.qtzcflour;
      this.dataForm.byjiechaoflour =
        this.dataForm.hjflour - this.dataForm.hejixiaohaoflour;
      this.dataForm.byljjiechaoflour =
        this.dataForm.byjiechaoflour + this.dataForm.syljjiechaoflour;
      this.LsByzcHjHjSun(); // 粮食表格-本月支出-合计（千克）合计方法
    },
    // 粮食表格-本月支出-大米合计方法
    LsByzcDmHjSun() {
      this.dataForm.hejixiaohaorice =
        this.dataForm.hxrice + this.dataForm.zrrice + this.dataForm.qtzcrice;
      this.dataForm.byjiechaorice =
        this.dataForm.hjrice - this.dataForm.hejixiaohaorice;
      this.LsByzcHjHjSun(); // 粮食表格-本月支出-合计（千克）合计方法
    },
    // 粮食表格-本月支出-食油合计方法
    LsByzcSyHjSun() {
      this.dataForm.hejixiaohaooil =
        this.dataForm.hxoil + this.dataForm.zroil + this.dataForm.qtzcoil;
      this.dataForm.byjiechaooil =
        this.dataForm.hjoil - this.dataForm.hejixiaohaooil;
      this.LsByzcHjHjSun(); // 粮食表格-本月支出-合计（千克）合计方法
    },
    // 粮食表格-本月支出-大豆合计方法
    LsByzcDdHjSun() {
      this.dataForm.hejixiaohaobean =
        this.dataForm.hxbean + this.dataForm.zrbean + this.dataForm.qtzcbean;
      this.dataForm.byjiechaobean =
        this.dataForm.hjbean - this.dataForm.hejixiaohaobean;
      this.LsByzcHjHjSun(); // 粮食表格-本月支出-合计（千克）合计方法
    },

    // 粮食表格-本月支出-合计（千克）合计方法
    LsByzcHjHjSun() {
      this.dataForm.hejixiaohaowhole =
        this.dataForm.hejixiaohaoflour +
        this.dataForm.hejixiaohaorice +
        this.dataForm.hejixiaohaooil +
        this.dataForm.hejixiaohaobean;
      this.dataForm.byjiechaowhole =
        this.dataForm.hjwhole - this.dataForm.hejixiaohaowhole;
    },

    // 粮食表格-本月节超-合计（千克）合计方法
    LsBycjHjHjSun() {
      this.dataForm.byjiechaowhole =
        this.dataForm.byjiechaoflour +
        this.dataForm.byjiechaorice +
        this.dataForm.byjiechaooil +
        this.dataForm.byjiechaobean;
    },
    // 粮食表格-上月累计节超-合计（千克）合计方法
    LsSyljjcHjHjSun() {
      this.dataForm.syljjiechaowhole =
        this.dataForm.syljjiechaoflour +
        this.dataForm.syljjiechaorice +
        this.dataForm.syljjiechaooil +
        this.dataForm.syljjiechaobean;
    },
    // 粮食表格-本月累计节超-合计（千克）合计方法
    LsByljjcHjHjSun() {
      this.dataForm.byljjiechaowhole =
        this.dataForm.byljjiechaoflour +
        this.dataForm.byljjiechaorice +
        this.dataForm.byljjiechaooil +
        this.dataForm.byljjiechaobean;
    },
    // 粮食表格-存(欠)上级粮食数-合计（千克）合计方法
    LsCQsjlssHjHjSun() {
      this.dataForm.cqsjwhole =
        this.dataForm.cqsjflour +
        this.dataForm.cqsjrice +
        this.dataForm.cqsjoil +
        this.dataForm.cqsjbean;
    },
    // 粮食表格-库存粮食数-合计（千克）合计方法
    LsKclssHjHjSun() {
      this.dataForm.kcxlwhole =
        this.dataForm.kcxlflour +
        this.dataForm.kcxlrice +
        this.dataForm.kcxloil +
        this.dataForm.kcxlbean;
    },
    // 粮食表格-库存粮票数-合计（千克）合计方法
    LsKclpsjHjSun() {
      this.dataForm.kclmwhole =
        this.dataForm.kclmflour +
        this.dataForm.kclmrice +
        this.dataForm.kclmoil +
        this.dataForm.kclmbean;
    },

    // 生活水平-各品名-合计（千克）合计方法
    ShspGpmHjSun(gVale, zValue, index) {
      this.dataForm.yueFoodList[index].hejiquantity = gVale + zValue;
      if (this.dataForm.realjiucantianshu > 0) {
        this.dataForm.yueFoodList[index].average =
          (this.dataForm.yueFoodList[index].hejiquantity * 1000) /
          this.dataForm.realjiucantianshu;
      } else if (this.dataForm.realjiucantianshu == 0) {
        this.dataForm.yueFoodList[index].average = 0;
      }
    },
    // 生活水平-每人每天伙食费方法
    ShspMrmthsf() {
      this.dataForm.reallowerstandard =
        this.dataForm.realkaizhihuoshi -
        this.dataForm.huoshistandard -
        this.dataForm.provisionDifference;
    },
    // 生活水平-购粮补贴方法
    ShspGlbt() {
      this.dataForm.reallowerstandard =
        this.dataForm.realkaizhihuoshi -
        this.dataForm.huoshistandard -
        this.dataForm.provisionDifference;
    },
    // 生活水平-实际就餐天数方法
    ShspSjjcts() {
      if (this.dataForm.realjiucantianshu > 0) {
        this.dataForm.realkaizhihuoshi =
          (this.dataForm.zhichuheji - this.dataForm.twaichu) /
          this.dataForm.realjiucantianshu;

        this.dataForm.yueFoodList.forEach((element) => {
          if (element.foodname) {
            element.average =
              (element.hejiquantity * 1000) / this.dataForm.realjiucantianshu;
          }
        });
      } else if (this.dataForm.realjiucantianshu == 0) {
        this.dataForm.realkaizhihuoshi = 0;
        this.dataForm.yueFoodList.forEach((element) => {
          if (element.foodname) {
            element.average = 0;
          }
        });
      }
      this.dataForm.reallowerstandard =
        this.dataForm.realkaizhihuoshi -
        this.dataForm.huoshistandard -
        this.dataForm.provisionDifference;
    },
    // 多选改变时回调
    CheckboxNamechange() {},
    // 生成月伙食公布表按钮
    generateTableChange() {
      this.createYueHuoShiApi();
    },
    // 首页返回按钮
    returnHome() {
      this.$router.push("/home");
    },
    // 下载excel
    downloads(url) {
      const iframe = document.createElement("iframe");
      iframe.style.display = "none";
      function iframeLoad() {
        const win = iframe.contentWindow;
        const doc = win.document;
        if (win.location.href === url) {
          if (doc.body.childNodes.length > 0) {
          }
          iframe.parentNode.removeChild(iframe);
        }
      }
      iframe.src = "";
      document.body.appendChild(iframe);
      setTimeout(function loadUrl() {
        iframe.contentWindow.location.href = url;
      }, 50);
    },
  },
};
</script>
<style lang="less" scoped>
.inputNumberWidth {
  width: 100%;
}
// 输入框
::v-deep.ssss.ivu-input-wrapper {
  //去掉输入框圆角
  .ivu-input {
    height: 29px !important;
    border-radius: 0px !important;
    text-align: center !important;
  }
}
// 数字输入框 当我们需要覆盖element-ui中的样式时只能通过深度作用选择器-样式穿透
::v-deep .tableInput {
  .ivu-input-number {
    height: 29px !important;
    line-height: 29px !important;
    border-radius: 0px !important;
    .ivu-input-number-handler-wrap {
      .ivu-input-number-handler {
        height: 14px !important;
      }
    }
    .ivu-input-number-input-wrap {
      height: 29px !important;
      line-height: 29px !important;
      .ivu-input-number-input {
        height: 29px !important;
        line-height: 29px !important;
        text-align: right;
        padding-right: 26px;
      }
    }
  }
}
.topBody {
  display: flex;
  padding-top: 24px;
  align-items: center;
  flex-wrap: wrap;
  .topBodyItem {
    margin-right: 12px;
    margin-bottom: 14px;
    .itemSpan {
      white-space: nowrap;
    }
    .itemImport {
      width: 200px;
    }
  }
}
</style>
